﻿namespace OutLook.Module.Load.Contracts
{
    using OutLook.Model.Domains;

    /// <summary>
    /// Intefcase for UserController
    /// </summary>
    public interface IUserContract
    {
        /// <summary>
        /// Registrates new user in the system
        /// </summary>
        /// <param name="user">User information</param>
        void Registrate(User user);

        /// <summary>
        /// Signs in the user
        /// </summary>
        /// <param name="login">User's login</param>
        /// <param name="password">User's password</param>
        /// <returns>True - if singing in is ok, otherwise - False</returns>
        bool LogIn(string login, string password);

        /// <summary>
        /// Sings out the user
        /// </summary>
        void LogOut();

        /// <summary>
        /// Changes user's password
        /// </summary>
        /// <param name="currentPassword">Current user's password</param>
        /// <param name="newPassword">New user's password</param>
        /// <param name="newPasswordConfirm">Confirmation password</param>
        /// <returns>True - if password changing is ok, otherwise - False</returns>
        bool ChangePassword(string currentPassword, string newPassword, string newPasswordConfirm);

        /// <summary>
        /// Recovers user's password
        /// </summary>
        /// <param name="email">User's email</param>
        /// <returns>True - if the system sent the letter on user's, otherwise - False</returns>
        bool RecoverPassword(string email);

        /// <summary>
        /// Displays user information
        /// </summary>
        /// <returns>User information if user is signing in, otherwise - NULL</returns>
        User ViewProfile();

        /// <summary>
        /// Saves changed user information
        /// </summary>
        /// <param name="user">New user information</param>
        /// <returns>True - if saving is ok, otherwise - False</returns>
        bool EditProfile(User user);

        /// <summary>
        /// Gets current signed in user
        /// </summary>
        /// <returns>User info</returns>
        User GetCurrentUser();
    }
}
